/*
 *	The characterio program counts blanks, tabs and newlines.
 *	Copyright (C) 1989-2089 Sergey Sergeevich Tsybanov All Rights Reserved
 *
 *	Characterio is free software: you can redistribute it and/or modify 
 *	it under the terms of the GNU General Public License as published 
 *	by the Free Software Foundation, either version 3 of the License, 
 *	or (at your option) any later version.
 *
 *	Characterio is distributed in the hope that it will be useful, but 
 *	WITHOUT ANY WARRANTY; without even the implied warranty of 
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 *	See the GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License 
 *	along with the characterio program. 
 *	If not, see <https://www.gnu.org/licenses/>.
 */

#include <stdio.h>

/*
 *	Count blanks, tabs and newlines.
 */
int main( void)
{
	char byte, blankCount, tabCount, newlineCount;
	blankCount = tabCount = newlineCount = 0;
	while ( ( byte = getchar()) != EOF) {
		switch ( byte) {
			case ' ': {
				++blankCount;
				break;
			}
			case '\t': {
				++tabCount;
				break;
			}
			case '\n': {
				++newlineCount;
				break;
			}
			default: {
				putchar( byte);
				break;
			}
		}
	}
	printf( "\nThere are %d blanks, %d tabs and %d newlines.\n", 
		blankCount, tabCount, newlineCount);

	return 0;
}